<%@include file="_header.jsp"%>

<link href="js/jqueryFileTree/jqueryFileTree.css" rel="stylesheet" type="text/css" media="screen" />
<script src="js/jqueryFileTree/jqueryFileTree.js" type="text/javascript"></script>

<title>32Learn</title>
</head>
<body>
    <c:choose>
        <c:when test="${userLevel != 2 && userLevel != 3 && userLevel != 1 && tryOut == null}">
            <%@include file="errorPage.jsp"%>
        </c:when><c:otherwise>
            <%@include file="_menu.jsp"%>

            <div class="wrappermain">


                <div class="digitalclass">
                    <div id="subheader"><a href="#"><div id="bar-textcontent">Browse documents</div></div>


                    <div class="main-digital">

                        <div id="fileTree"></div>
                        <c:choose>
                            <c:when test="${userLevel != null}">
                                <script language="javascript">

                                    $(document).ready( function() {

                                        $('#fileTree').fileTree({
                                            root: ${browsecourseid},
                                            script: 'jqueryFileTree.jsp',
                                            expandSpeed: 300,
                                            collapseSpeed: 300,
                                            multiFolder: false,
                                            checkBoxes: false
                                        }, function(file) {
                                            location.href='documents/'+file;
                                        }); 
                                    });
                                </script>
                            </c:when>

                            <c:otherwise>
                                <script language="javascript">

                                    $(document).ready( function() {

                                        $('#fileTree').fileTree({
                                            root: ${browsecourseid}+"/tryout" ,
                                            script: 'jqueryFileTree.jsp',
                                            expandSpeed: 300,
                                            collapseSpeed: 300,
                                            multiFolder: false,
                                            checkBoxes: false
                                        }, function(file) {
                                            location.href='documents/'+file;
                                        }); 
                                    });
                                </script>
                            </c:otherwise>

                        </c:choose> 




                    </div>
                </div>
            </div>

        </c:otherwise></c:choose>
</body>
</html>
